package com.thingsgrid.basicInterface.myenum;

public enum TypeEnum {

	TYPE_ENUM_ZERO("0","功能组"),
	TYPE_ENUM_ONE("1","权限包")

	;

	TypeEnum(String type, String name) {
		this.type = type;
		this.name = name;
	}

	private String type;

	private String name ;

	public  String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public static String getName(String type) {
		TypeEnum[] values = TypeEnum.values();
		for(TypeEnum typeEnum : values){
			if(typeEnum.getType().equals(type)) {
				return typeEnum.name;
			}
		}
		return "未找到";
	}

}
